package game;

import java.util.ArrayList;

import rps.RPSEnum;



public class Player {
	
	private String name;
	private int score;
	ArrayList<RPSEnum> move;
	int count;
	
	
	
	public Player(String Nom, int scor,ArrayList<RPSEnum> mov ){
		
		move = mov;
		name = Nom;
		score = scor;
		count = 0;
	}
	
	public RPSEnum getNextMove()
	{
		if(count < 20)
		{	
		 RPSEnum a= move.get(count);
		 count ++;
		 return a;
		}
		else
			return null;
	}
	
	public Player(String Nom)
	{
		count = 0;
		
		move = new ArrayList<RPSEnum>();
		int rand = (int)(Math.random() * 2);//number between 0 and 2
		
		for(int i=0;i<20;i++)
		{
			switch(rand){
				case 0:{
					move.add(RPSEnum.PAPER);
				}
				break;
				case 1:{
					move.add(RPSEnum.ROCK);
				}
				break;
				case 2:{
					move.add(RPSEnum.SCISSORS);
				}
				break;
			}
		}
	}
	
	public String get_name(){
		return name;
	}
	
	public int get_score(){
		return score;
	}
	
	public int get_size(){
		return move.size();
	}
	
	public void set_score(int scor)
	{
		score = scor;
	}
	

}
